<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link type="text/css" rel="stylesheet" href="css/style.css" />
    <!--[if IE 6]>
    <script src="js/iepng.js" type="text/javascript"></script>
    <script type="text/javascript">
        EvPNG.fix('div, ul, img, li, input, a');
    </script>
    <![endif]-->
    <script type="text/javascript" src="js/jquery-1.11.1.min_044d0927.js"></script>
    <script type="text/javascript" src="js/jquery.bxslider_e88acd1b.js"></script>

    <script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="js/menu.js"></script>

    <script type="text/javascript" src="js/select.js"></script>

    <script type="text/javascript" src="js/lrscroll.js"></script>

    <script type="text/javascript" src="js/iban.js"></script>
    <script type="text/javascript" src="js/fban.js"></script>
    <script type="text/javascript" src="js/f_ban.js"></script>
    <script type="text/javascript" src="js/mban.js"></script>
    <script type="text/javascript" src="js/bban.js"></script>
    <script type="text/javascript" src="js/hban.js"></script>
    <script type="text/javascript" src="js/tban.js"></script>

    <script type="text/javascript" src="js/lrscroll_1.js"></script>

    <script type="text/javascript">
        $(function(){
            $('input[name=loginname]').blur(function (){
                var loginname = $('input[name=loginname]').val();
                $.ajax({
                    url:"Regist/loginNameJudge",
                    data:{
                        "loginName":loginname
                    },
                    success:function (data) {
                        if(data.msg == 1){
                           alert("用户名已存在");
                        }
                    }
                })
            })
            $('#ti').click(function () {
                if( $('input[type=checkbox]').is(':checked') ) {
                    var loginname = $('input[name=loginname]').val();
                    var password = $('input[name=password]').val();
                    var password2 = $('input[name=password2]').val();
                    var email = $('input[name=email]').val();
                    var mobile = $('input[name=mobile]').val();
                    var username = $('input[name=username]').val();
                    var identitycode = $('input[name=identitycode]').val();
                    var sex=$('input:radio[name="sex"]:checked').val();
                    if (loginname == '') {
                        alert("用户名未填");
                    } else if (password == '') {
                        alert("密码未填");
                    } else if (username == '') {
                        alert("真实姓名未填");
                    } else if (password2 == '') {
                        alert("重复密码未填");
                    } else if (password != password2) {
                        alert("密码不一致");
                    }
                    $.ajax({
                        url: "/Regist/Register",
                        data: {
                            "loginname": loginname,
                            "password": password,
                            "email": email,
                            "mobile": mobile,
                            "username": username,
                            "identitycode": identitycode,
                            "sex":sex
                        },
                        success: function (data) {
                            if (data.msg == 1) {
                                $('form').submit();
                                window.location.href = "Login.html";
                            } else if (data.msg == 2) {
                                alert("注册失败")
                            }
                        }
                    })
                }else{
                    alert("请填写用户协议");
                }
            })
            $("input[name=email]").blur(function () {
                var email = $("#email").val();
                var _email = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
                if (!_email.test(email)) {
                    alert("请输入有效的邮箱地址！");
                    $("input[name=email]").val("");
                }
            })
            $(".l_tel").blur(function () {
                var mobile = $("input[name=mobile]").val();
                var _mobile = /^1[34578]\d{9}$/;
                if (!_mobile.test(mobile)) {
                    alert("请输入正确的手机号");
                    $("input[name=mobile]").val("");
                }
            })
            $(".l_mem").blur(function () {
                var username = $("input[name=username]").val();
                var _username = /^[\u4e00-\u9fa5]{2,4}$/i
                if (!_username.test(username)) {
                    alert("请输入正确的姓名");
                    $("input[name=username]").val("");
                }
            })
            $(".l_num").blur(function () {
                var identitycode = $("input[name=identitycode]").val();
                var _identitycode = /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
                if (!_identitycode.test(identitycode)) {
                    alert("请输入正确格式的身份证号");
                    $("input[name=identitycode]").val("");
                }
            })
        })
    </script>

    <title>尤洪</title>
</head>
<body>
<!--Begin Header Begin-->
<div class="soubg">
    <div class="sou">
        <span class="fr">
        	<span class="fl">你好，请<a href="Login.html">登录</a>&nbsp; <a href="Regist.html" style="color:#ff4e00;">免费注册</a>&nbsp; </span>
            <span class="fl">|&nbsp;关注我们：</span>
            <span class="s_sh"><a href="#" class="sh1">新浪</a><a href="#" class="sh2">微信</a></span>
            <span class="fr">|&nbsp;<a href="#">手机版&nbsp;<img src="images/s_tel.png" align="absmiddle" /></a></span>
        </span>
    </div>
</div>
<!--End Header End-->
<!--Begin Login Begin-->
<div class="log_bg">
    <div class="top">
        <div class="logo"><a href="Index.html"><img src="images/logo.png" /></a></div>
    </div>
    <div class="regist">
        <div class="log_img"><img src="images/l_img.png" width="611" height="425" /></div>
        <div class="reg_c">
            <form action="Regist" method="post">
                <table border="0" style="width:420px; font-size:14px; margin-top:20px;" cellspacing="0" cellpadding="0">
                    <tr height="50" valign="top">
                        <td width="95">&nbsp;</td>
                        <td>
                            <span class="fl" style="font-size:24px;">注册</span>
                            <span class="fr">已有商城账号，<a href="Login.html" style="color:#ff4e00;">我要登录</a></span>
                        </td>
                    </tr>
                    <tr height="50">
                        <td align="right"><font color="#ff4e00">*</font>&nbsp;用户名 &nbsp;</td>
                        <td><input type="text" value="" class="l_user" name="loginname" /></td>
                    </tr>
                    <tr height="50">
                        <td align="right"><font color="#ff4e00">*</font>&nbsp;密码 &nbsp;</td>
                        <td><input type="password" value="" class="l_pwd" name="password" /></td>
                    </tr>
                    <tr height="50">
                        <td align="right"><font color="#ff4e00">*</font>&nbsp;确认密码 &nbsp;</td>
                        <td><input type="password" value="" class="l_pwd" name="password2" /></td>
                    </tr>
                    <tr height="50">
                        <td align="right">&nbsp;邮箱 &nbsp;</td>
                        <td><input type="text" value="" class="l_email"  name="email"/></td>
                    </tr>
                    <tr height="50">
                        <td align="right">&nbsp;手机 &nbsp;</td>
                        <td><input type="text" value="" class="l_tel" name="mobile" /></td>
                    </tr>
                    <tr height="50">
                        <td align="right"><font color="#ff4e00">*</font>&nbsp;真实姓名 &nbsp;</td>
                        <td><input type="text" value="" class="l_mem"  name="username"/></td>
                    </tr>
                    <tr height="50">
                        <td align="right">身份证号码</td>
                        <td><input type="text" value="" class="l_num" name="identitycode" /></td>
                    </tr>
                    <tr height="50">
                        <td >男<input type="radio" name="sex" value="1"/>女<input type="radio" name="sex" value="2" /></td>
                    </tr>
                    <tr height="50">
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td style="font-size:12px; padding-top:20px;">
                	<span style="font-family:'宋体';" class="fl">
                    	<label class="r_rad"><input type="checkbox" /></label><label class="r_txt">我已阅读并接受《用户协议》</label>
                    </span>
                        </td>
                    </tr>
                    <tr height="60">
                        <td>&nbsp;</td>
                        <td><input type="button" value="立即注册" class="log_btn" id="ti" /></td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
</div>
<!--End Login End-->
<!--Begin Footer Begin-->
<div class="btmbg">
    <div class="btm">
        备案/许可证编号：蜀ICP备12009302号-1-www.dingguagua.com   Copyright © 2015-2018 尤洪商城网 All Rights Reserved. 复制必究 , Technical Support: Dgg Group <br />
        <img src="images/b_1.gif" width="98" height="33" /><img src="images/b_2.gif" width="98" height="33" /><img src="images/b_3.gif" width="98" height="33" /><img src="images/b_4.gif" width="98" height="33" /><img src="images/b_5.gif" width="98" height="33" /><img src="images/b_6.gif" width="98" height="33" />
    </div>
</div>
<!--End Footer End -->

</body>


<!--[if IE 6]>
<script src="//letskillie6.googlecode.com/svn/trunk/2/zh_CN.js"></script>
<![endif]-->
</html>
